<?php

namespace App\Http\Controllers\V1\Api;

use App\Models\V1\District;

use Illuminate\Http\Request;

class DistrictController extends BaseController
{
    /**
     * 信息分类列表
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function index(Request $request)
    {
        $pageSize = $request->input('pageSize', 100);
        $query = District::query();
        $query->where('pid', $request->input('pid', 0));
        $data = $query->paginate($pageSize);
        return ajax_output(200, "成功", $data);
    }

}
